package com.guaoran.micro.services.spring.boot.auto.configuraton.config;

import com.guaoran.micro.services.spring.boot.auto.configuraton.service.CacheService;
import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author : guaoran
 * @Description 通过 {@link ImportSelector} 来实现 @Enable 注解驱动
 * @date :2019/7/8 21:52
 */
public class CacheImportSelector implements DeferredImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {

        return new String[]{CacheService.class.getName()};
    }
}
